package jp.dodododo.dao;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

import jp.dodododo.dao.exception.SQLRuntimeException;

public interface SelectDao {
	<ROW> List<ROW> select(String sql, Map<String, Object> arg, Class<ROW> entityClass) throws SQLRuntimeException;

	<ROW> List<ROW> select(String sql, Map<String, Object> arg, Class<ROW> entityClass, IterationCallback<ROW> callback)
			throws SQLRuntimeException;

	<ROW> List<ROW> select(String sql, Class<ROW> entityClass) throws SQLRuntimeException;

	<ROW> List<ROW> select(String sql, Class<ROW> entityClass, IterationCallback<ROW> callback) throws SQLRuntimeException;

	<ROW> ROW selectOne(String sql, Map<String, Object> arg, Class<ROW> entityClass) throws SQLRuntimeException;

	<ROW> ROW selectOne(String sql, Class<ROW> entityClass) throws SQLRuntimeException;

	List<Map<String, Object>> selectMap(String sql, Map<String, Object> arg) throws SQLRuntimeException;

	List<Map<String, Object>> selectMap(String sql, Map<String, Object> arg, IterationCallback<Map<String, Object>> callback)
			throws SQLRuntimeException;

	List<Map<String, Object>> selectMap(String sql) throws SQLRuntimeException;

	List<Map<String, Object>> selectMap(String sql, IterationCallback<Map<String, Object>> callback) throws SQLRuntimeException;

	Map<String, Object> selectOneMap(String sql, Map<String, Object> arg) throws SQLRuntimeException;

	Map<String, Object> selectOneMap(String sql) throws SQLRuntimeException;

	BigDecimal selectOneNumber(String sql, Map<String, Object> arg) throws SQLRuntimeException;

	BigDecimal selectOneNumber(String sql) throws SQLRuntimeException;
}
